]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
shell-recorder-src: Statically init mutexes instead of using the deprecated API
authorJasper St. Pierre <jstpierre@mecheye.net>
Mon, 17 Oct 2011 15:03:29 +0000 (11:03 -0400)
committerJasper St. Pierre <jstpierre@mecheye.net>
Tue, 18 Oct 2011 20:13:50 +0000 (16:13 -0400)
https://bugzilla.gnome.org/show_bug.cgi?id=662011

src/shell-recorder-src.c

index 5fbdf7c7ba4dc2c6a36f12a3672810c9e73e0b33..3c6bdefcfebc80c7894f901289e24055f140c25d 100644 (file)
@@ -10,6 +10,7 @@ struct _ShellRecorderSrc
 {
   GstPushSrc parent;
 
+  GMutex mutex_data;
   GMutex *mutex;
 
   GstCaps *caps;
@@ -40,7 +41,8 @@ shell_recorder_src_init (ShellRecorderSrc      *src,
                         ShellRecorderSrcClass *klass)
 {
   src->queue = g_async_queue_new ();
-  src->mutex = g_mutex_new ();
+  src->mutex = &src->mutex_data;
+  g_mutex_init (src->mutex);
 }
 
 static void
@@ -140,7 +142,7 @@ shell_recorder_src_finalize (GObject *object)
   shell_recorder_src_set_caps (src, NULL);
   g_async_queue_unref (src->queue);
 
-  g_mutex_free (src->mutex);
+  g_mutex_clear (src->mutex);
 
   G_OBJECT_CLASS (parent_class)->finalize (object);
 }